// 参与记录数据
const participantRecordsData = [
  {
    name: '用户1458***',
    avatar: 'https://joeschmoe.io/api/v1/random',
    time: '2025-07-28 14:23',
    amount: '1,000'
  },
  {
    name: '用户2367***',
    avatar: 'https://joeschmoe.io/api/v1/random',
    time: '2025-07-28 13:45',
    amount: '500'
  },
  {
    name: '用户7891***',
    avatar: 'https://joeschmoe.io/api/v1/random',
    time: '2025-07-28 12:30',
    amount: '2,000'
  },
  {
    name: '用户4562***',
    avatar: 'https://joeschmoe.io/api/v1/random',
    time: '2025-07-28 10:15',
    amount: '300'
  },
  {
    name: '用户9087***',
    avatar: 'https://joeschmoe.io/api/v1/random',
    time: '2025-07-27 23:50',
    amount: '5,000'
  },
  {
    name: '用户3698***',
    avatar: 'https://joeschmoe.io/api/v1/random',
    time: '2025-07-27 22:15',
    amount: '800'
  },
  {
    name: '用户5214***',
    avatar: 'https://joeschmoe.io/api/v1/random',
    time: '2025-07-27 20:30',
    amount: '1,500'
  },
  {
    name: '用户7836***',
    avatar: 'https://joeschmoe.io/api/v1/random',
    time: '2025-07-27 18:45',
    amount: '2,500'
  },
  {
    name: '用户1923***',
    avatar: 'https://joeschmoe.io/api/v1/random',
    time: '2025-07-27 16:20',
    amount: '700'
  },
  {
    name: '用户6475***',
    avatar: 'https://joeschmoe.io/api/v1/random',
    time: '2025-07-27 14:10',
    amount: '1,200'
  }
];

/**
 * 获取项目参与记录
 * @param {Object} params 查询参数
 * @returns {Object} 参与记录数据
 */
export function getParticipantRecords(params = {}) {
  const { page = 1, size = 5, projectId } = params;
  
  // 计算分页
  const start = (page - 1) * size;
  const end = start + size;
  const list = participantRecordsData.slice(start, end);
  
  return {
    code: 0,
    message: '获取参与记录成功',
    data: {
      list,
      total: participantRecordsData.length,
      page: parseInt(page),
      size: parseInt(size)
    }
  };
}

export default {
  getParticipantRecords
};
